@import url("https://fonts.googleapis.com/css2?family=El+Messiri:wght@400..700&display=swap");

body {
  direction: rtl;
  font-family: "El Messiri", sans-serif;
}

:root {
  /* ===== SPACING ===== */
  --ebhdr3-space-xs: 0.4rem;
  --ebhdr3-space-sm: 0.8rem;
  --ebhdr3-space-md: 1.2rem;
  --ebhdr3-space-lg: 2rem;
  --ebhdr3-space-xl: 3rem;

  /* ===== FONT SCALE ===== */
  --ebhdr3-fs-sm: 0.85rem;
  --ebhdr3-fs-base: 1rem;
  --ebhdr3-fs-md: 1.1rem;
  --ebhdr3-fs-lg: 1.125rem;
  --ebhdr3-fs-xl: 1.6rem;
  --ebhdr3-fs-2xl: 1.25rem;
  /* ===== TRANSITION ===== */
  --ebhdr3-transition: 0.35s cubic-bezier(0.4, 0, 0.2, 1);

  --ebhdr3-shadow-card:
    0 10px 10px 0 rgb(148, 110, 49, 0.1), 0 10px 10px 0 rgb(148, 110, 49, 0.06);
  /* ====== border radius === */
  --ebhdr3-br-sm: 12px;

  --ebhdr3-white: #ffffff;
  --ebhdr3-dark: #000000;
  --ebhdr3-overlay: rgba(0, 0, 0, 0.45);
  --ebhdr3-primary: #1d3052;

  --ebhdr3-secondary: #f68322;

  --ebhdr3-gray: #cccccc;
  --ebhdr3-whatsapp-color: #25d366;
  --ebhdr3-shadow: 0 0 15px rgba(0, 0, 0, 0.25);
  --ebhdr3-drop-down-shadow: 0 0 15px rgba(0, 0, 0, 0.226);
}

* {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
}

body {
  direction: rtl;
}

a {
  text-decoration: none;
  color: inherit;
}

button {
  border: none;
  background-color: inherit;
}

main {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: var(--ebhdr3-space-lg);
}

.ebhdr3-hdr {
  position: sticky;
  top: 0;
  z-index: 99;
  transition: var(--ebhdr3-transition);
  box-shadow: 0 6px 18px rgba(2, 6, 23, 0.35);
}

.ebhdr3-hdr.ebhdr3-nav--scrolled {
  position: sticky;
  top: 0;
  left: 0;
  z-index: 99;
  transition: var(--ebhdr3-transition);
  background: var(--ebhdr3-white);
  box-shadow: var(--ebhdr3-shadow);
}

.ebhdr3-container {
  display: flex;
  align-items: center;
  justify-content: space-evenly;
  padding: var(--ebhdr3-space-xs);
}

.ebhdr3-nav-menu-container {
  position: relative;
}

/* ✅LOGO */
.ebhdr3-logo {
  display: flex;
  align-items: center;
  gap: var(--ebhdr3-space-xs);
  font-size: clamp(1.5rem, 5vw, 2rem);
  font-weight: clamp(800, 5vw, 900);
  text-decoration: none;
  color: inherit;
}

.ebhdr3-site-name {
  direction: ltr;
}

.ebhdr3-logo img {
  border-radius: var(--ebhdr3-br-sm);
  width: 40px;
  height: 40px;
}

.ebhdr3-logo-dark {
  color: var(--ebhdr3-dark);
}

.ebhdr3-logo-light {
  color: var(--ebhdr3-secondary);
}

.ebhdr3-hdr.ebhdr3-nav--scrolled .ebhdr3-logo-light {
  color: var(--ebhdr3-secondary);
}

/* ✅ nav__menu-upper */

.ebhdr3-nav-menu-upper {
  display: none;
  flex-direction: column;
  align-items: end;
  justify-content: end;

  font-size: var(--ebhdr3-fs-2xl);
  line-height: 1.75rem;
  font-weight: bold;
  padding: var(--ebhdr3-space-md) 0 0 var(--ebhdr3-space-md);

  color: var(--ebhdr3-dark);
}

.ebhdr3-nav--open .ebhdr3-nav-menu-upper {
  display: flex;
}

/* ✅ nav__menu-bottom */
.ebhdr3-nav-menu-bottom {
  display: none;
  flex-direction: row;
  align-items: center;
  justify-content: space-between;
  gap: var(--ebhdr3-space-xs);

  border-top: 1px solid var(--ebhdr3-gray);
  background-color: var(--ebhdr3-white);
  padding: var(--ebhdr3-space-md) var(--ebhdr3-space-xs);

  position: sticky;
  bottom: 0;
  left: 0;
  right: 0;
  width: 100%;
}

/* ------------------ */
.ebhdr3-nav-menu-bottom-btn {
  display: flex;
  flex-direction: row;
  align-items: center;
  gap: var(--ebhdr3-space-xs);
  padding: var(--ebhdr3-space-xs);
  text-decoration: none;
  direction: ltr;
}

.ebhdr3-nav-menu-bottom-call-btn {
  background-color: var(--ebhdr3-gray);
  border-radius: var(--ebhdr3-br-sm);
  /* width: 50%; */
  justify-content: center;
}

.ebhdr3-nav-menu-bottom-call-btn span {
  font-weight: 700;
  color: var(--ebhdr3-dark);
}

.ebhdr3-nav-menu-bottom-call-btn i {
  font-weight: 550;
  font-size: var(--ebhdr3-fs-lg);
}

.ebhdr3-nav-menu-bottom-whats-btn i {
  font-weight: 550;
  font-size: var(--ebhdr3-fs-xl);
  color: var(--ebhdr3-white);
}

.ebhdr3-nav-menu-bottom-whats-btn {
  background-color: var(--ebhdr3-whatsapp-color);
  justify-content: center;
  border-radius: var(--ebhdr3-br-sm);
  font-weight: 700;
  /* width: 50%; */
  color: var(--ebhdr3-white);
}

.ebhdr3-nav--open .ebhdr3-nav-menu-bottom {
  display: flex;
}

.ebhdr3-nav-menu-bottom-address-btn {
  font-size: var(--ebhdr3-fs-sm);
  padding: var(--ebhdr3-space-sm);
  gap: var(--ebhdr3-space-sm);
  background-color: var(--ebhdr3-gray);
  border-radius: var(--ebhdr3-br-sm);
}

.ebhdr3-nav-menu-bottom-address-btn span {
  color: var(--clr-text);
}

/* ✅  DESKTOP MENU (≥1024px) */
.ebhdr3-nav-menu {
  transition: var(--ebhdr3-transition);
}

.ebhdr3-nav-list {
  list-style: none;
  display: flex;
  gap: var(--ebhdr3-space-lg);
}

.ebhdr3-nav-link {
  text-decoration: none;
  font-size: 0.97rem;
  font-weight: 400;
  color: var(--ebhdr3-dark);
  transition: var(--ebhdr3-transition);
}

.ebhdr3-nav-link:hover {
  color: var(--ebhdr3-secondary);
}

/* ✅ Dropdown */
.ebhdr3-nav-dropdown {
  position: relative;
}

.ebhdr3-nav-dropdown i {
  transition: transform 0.35s ease;
}

.ebhdr3-dropdown {
  position: absolute;
  top: 100%;
  right: 0;
  background: var(--ebhdr3-white);

  padding: var(--ebhdr3-space-md);
  list-style: none;
  border-radius: 10px;
  width: 300px;
  /* box-shadow: var(--ebhdr3-shadow-card); */
  opacity: 0;
  max-height: 0;
  pointer-events: none;
  transition: all 0.35s ease;

  display: flex;
  flex-direction: column;
  gap: var(--ebhdr3-space-lg);
}

.ebhdr3-dropdown a {
  color: var(--ebhdr3-dark);
}

/* ✅  HAMBURGER BUTTON */
.ebhdr3-nav-toggle {
  display: none;
  flex-direction: column;
  gap: 5px;
  background: none;
  border: none;
  cursor: pointer;
}

.ebhdr3-nav-toggle span {
  width: 24px;
  height: 2px;
  background: var(--ebhdr3-dark);
  transition: var(--ebhdr3-transition);
}

/* Morph Animation */
.ebhdr3-nav--open .ebhdr3-nav-toggle span:nth-child(1) {
  transform: rotate(45deg) translateY(10px);
}

.ebhdr3-nav--open .ebhdr3-nav-toggle span:nth-child(2) {
  opacity: 0;
}

.ebhdr3-nav--open .ebhdr3-nav-toggle span:nth-child(3) {
  transform: rotate(-45deg) translateY(-10px);
}

.nav-services-btn::after {
  content: "+";
  margin-inline-start: var(--ebhdr3-space-xs);
  transition: transform 0.45s ease-in-out;
  display: inline-block;
}

.ebhdr3-nav-dropdown.open .nav-services-btn::after {
  content: "-";
  transform: rotate(180deg);
}

@media (max-width: 768px) {
  .ebhdr3-nav-toggle {
    display: flex;
  }

  .ebhdr3-container {
    padding: var(--ebhdr3-space-sm);
    justify-content: space-between;
  }

  .ebhdr3-nav-menu {
    position: fixed;
    top: 0;
    right: 0;
    height: 100vh;
    overflow: auto;
    /* width: 280px; */
    transform: translateY(-100%);
    display: flex;
    flex-direction: column;
    align-items: start;
    justify-content: start;

    background: var(--ebhdr3-overlay);
    opacity: 0;
    pointer-events: none;
    transition: var(--ebhdr3-transition);
    width: 100%;
  }

  .ebhdr3-nav-menu-container {
    height: 100%;
    width: min(95%, 290px);
    background: var(--ebhdr3-white);
    margin: 0;
    display: flex;
    flex-direction: column;
    gap: 0;
  }

  .ebhdr3-nav--open .ebhdr3-nav-menu {
    transform: translateY(0);
    opacity: 1;
    pointer-events: all;
  }

  .ebhdr3-nav-menu-pages {
    flex: 1;
    overflow-y: auto;
  }

  .ebhdr3-nav-list {
    flex-direction: column;
    gap: var(--ebhdr3-space-md);
    width: 100%;
    padding: 0 var(--ebhdr3-space-lg);
  }

  /* Stagger Initial State */
  .ebhdr3-nav-item {
    opacity: 0;
    transform: translateY(20px);
    transition: var(--ebhdr3-transition);
  }

  /* When Open */
  .ebhdr3-nav--open .ebhdr3-nav-item {
    opacity: 1;
    transform: translateY(0);
  }

  .ebhdr3-nav-item {
    border-bottom: 1px solid var(--ebhdr3-gray);
    padding: var(--ebhdr3-space-xs);
  }

  .nav-services-btn {
    width: 100%;
    text-align: start;
  }

  /* Stagger Effect */
  .ebhdr3-nav--open .ebhdr3-nav-item:nth-child(1) {
    transition-delay: 0.1s;
  }

  .ebhdr3-nav--open .ebhdr3-nav-item:nth-child(2) {
    transition-delay: 0.2s;
  }

  .ebhdr3-nav--open .ebhdr3-nav-item:nth-child(3) {
    transition-delay: 0.3s;
  }

  .ebhdr3-nav--open .ebhdr3-nav-item:nth-child(4) {
    transition-delay: 0.4s;
  }

  .ebhdr3-nav--open .ebhdr3-nav-item:nth-child(5) {
    transition-delay: 0.5s;
  }

  .ebhdr3-nav-dropdown .ebhdr3-dropdown {
    position: static;

    gap: var(--ebhdr3-space-sm);
    width: 100%;
    background: inherit;
    padding: 0 var(--ebhdr3-space-sm) 0 var(--ebhdr3-space-sm);
    list-style: none;
    border-radius: 0;
    /* box-shadow: var(--ebhdr3-drop-down-shadow); */

    overflow: hidden;

    max-height: 0;
    opacity: 0;

    transition:
      max-height 0.4s ease,
      opacity 0.3s ease;
  }

  .ebhdr3-nav-dropdown.open .ebhdr3-dropdown {
    max-height: 500px;
    opacity: 1;
    pointer-events: all;
    overflow-y: scroll;
  }

  .ebhdr3-dropdown .ebhdr3-nav-item:last-child {
    border-bottom: none;
  }
}

@media (min-width: 769px) {
  .ebhdr3-nav-dropdown:hover .ebhdr3-dropdown {
    opacity: 1;
    max-height: 500px;
    overflow-y: auto;
    pointer-events: auto;
  }

  .ebhdr3-nav-dropdown:hover i {
    transform: rotate(180deg);
  }

  .ebhdr3-nav-dropdown:hover .nav-services-btn::after {
    content: "-";
    transform: rotate(180deg);
  }

  .ebhdr3-nav-item {
    position: relative;
  }

  .ebhdr3-nav-item::before {
    content: "";
    position: absolute;
    bottom: -5px;
    left: 0;
    height: 2px;
    width: 0;
    background-color: var(--ebhdr3-primary);
    border-radius: 20px;
    transition: width 0.4s ease;
  }

  .ebhdr3-nav-item:hover::before {
    width: 100%;
  }
}
